package com.netease.pris.offline;

import android.text.TextUtils;
import com.netease.b.a.ag;
import com.netease.b.a.k;
import com.netease.pris.atom.g;
import com.netease.pris.v;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.concurrent.atomic.AtomicBoolean;

public class c extends ag
  implements com.netease.framework.b.d, com.netease.i.c
{
  String a;
  String b;
  LinkedList c;
  LinkedList d = new LinkedList();
  com.netease.pris.atom.u e;
  int f;
  LinkedList g;
  LinkedList i;
  AtomicBoolean j = new AtomicBoolean(false);
  ProcessResult k = new ProcessResult();
  e l;

  private c(LinkedList paramLinkedList, String paramString1, String paramString2)
  {
    super(2100);
    if (paramLinkedList != null)
    {
      Iterator localIterator = paramLinkedList.iterator();
      while (localIterator.hasNext())
      {
        com.netease.pris.atom.u localu = (com.netease.pris.atom.u)localIterator.next();
        this.d.add(localu.V());
      }
    }
    this.a = paramString1;
    this.b = paramString2;
    this.c = paramLinkedList;
  }

  private int a(ag paramag)
  {
    if (o());
    for (int m = -1; ; m = paramag.m())
    {
      return m;
      paramag.b(0);
      paramag.a(this);
      paramag.c(l());
      paramag.d(3);
      paramag.a(this);
      g().a(paramag);
    }
  }

  public static c a(LinkedList paramLinkedList, String paramString1, String paramString2)
  {
    return new c(paramLinkedList, paramString1, paramString2);
  }

  private void a()
  {
    if (o());
    while (true)
    {
      return;
      while (true)
        if ((this.c != null) && (this.c.size() > 0))
        {
          this.e = ((com.netease.pris.atom.u)this.c.removeFirst());
          this.k.a(this.e.U());
          this.k.e(1);
          a(1);
          String str = this.e.b(g.b);
          if (TextUtils.isEmpty(str))
            continue;
          this.f = a(k.a(this.a, this.b, str, this.e.be(), this.e, false, true));
          this.j.set(false);
          break;
        }
      this.j.set(false);
      if (!o())
      {
        if (this.i.size() > 0)
          continue;
        e(1);
        a(7);
      }
      super.e();
      h();
    }
  }

  private void a(int paramInt)
  {
    b.a().a(paramInt, this.k);
    if (this.l != null)
      this.l.a(paramInt, this.k);
  }

  private boolean b()
  {
    int m;
    if (o())
      m = 0;
    while (true)
    {
      return m;
      while (true)
        if ((this.g != null) && (this.g.size() > 0))
        {
          com.netease.pris.atom.u localu = (com.netease.pris.atom.u)this.g.removeFirst();
          if (localu == null)
            continue;
          k localk = k.a(this.a, this.b, localu, b(localu));
          this.i.add(Integer.valueOf(localk.m()));
          a(localk);
          m = 1;
          break;
        }
      m = 0;
    }
  }

  private boolean b(com.netease.pris.atom.u paramu)
  {
    if ((this.e.az() == com.netease.pris.atom.c.a) || (this.e.az() == com.netease.pris.atom.c.c) || (this.e.az() == com.netease.pris.atom.c.h) || (paramu.az() == com.netease.pris.atom.c.a) || (paramu.az() == com.netease.pris.atom.c.c) || (paramu.az() == com.netease.pris.atom.c.h));
    for (int m = 1; ; m = 0)
      return m;
  }

  private void e(int paramInt)
  {
    v localv;
    LinkedList localLinkedList;
    if (this.d != null)
    {
      localv = v.a();
      localLinkedList = this.d;
      if (com.netease.pris.a.u.a(com.netease.b.a.d.h().a()) != 0)
        break label47;
    }
    label47: for (boolean bool = true; ; bool = false)
    {
      localv.a(localLinkedList, bool, 0, paramInt);
      this.d = null;
      return;
    }
  }

  public void a(byte paramByte, int paramInt)
  {
  }

  // ERROR //
  public void a(int paramInt1, int paramInt2, int paramInt3, Object paramObject)
  {
    // Byte code:
    //   0: iconst_0
    //   1: istore 5
    //   3: aload_0
    //   4: invokevirtual 84	com/netease/pris/offline/c:o	()Z
    //   7: ifeq +4 -> 11
    //   10: return
    //   11: iload_1
    //   12: sipush 20003
    //   15: if_icmpeq -5 -> 10
    //   18: iload_1
    //   19: sipush 20004
    //   22: if_icmpeq -12 -> 10
    //   25: iload_2
    //   26: tableswitch	default:+22 -> 48, 900:+25->51, 901:+129->155
    //   49: impdep2
    //   50: <illegal opcode>
    //   51: iload_1
    //   52: iconst_4
    //   53: if_icmpne -43 -> 10
    //   56: aload_0
    //   57: getfield 163	com/netease/pris/offline/c:i	Ljava/util/LinkedList;
    //   60: astore 8
    //   62: aload 8
    //   64: monitorenter
    //   65: aload_0
    //   66: getfield 163	com/netease/pris/offline/c:i	Ljava/util/LinkedList;
    //   69: new 195	java/lang/Integer
    //   72: dup
    //   73: iload_3
    //   74: invokespecial 236	java/lang/Integer:<init>	(I)V
    //   77: invokevirtual 239	java/util/LinkedList:remove	(Ljava/lang/Object;)Z
    //   80: ifeq +179 -> 259
    //   83: aload_0
    //   84: getfield 45	com/netease/pris/offline/c:k	Lcom/netease/pris/offline/ProcessResult;
    //   87: iconst_1
    //   88: invokevirtual 240	com/netease/pris/offline/ProcessResult:a	(I)V
    //   91: aload_0
    //   92: getfield 45	com/netease/pris/offline/c:k	Lcom/netease/pris/offline/ProcessResult;
    //   95: iconst_1
    //   96: invokevirtual 241	com/netease/pris/offline/ProcessResult:c	(I)V
    //   99: aload_0
    //   100: invokespecial 243	com/netease/pris/offline/c:b	()Z
    //   103: ifne +150 -> 253
    //   106: aload_0
    //   107: getfield 163	com/netease/pris/offline/c:i	Ljava/util/LinkedList;
    //   110: invokevirtual 116	java/util/LinkedList:size	()I
    //   113: ifne +140 -> 253
    //   116: iconst_1
    //   117: istore 5
    //   119: iconst_1
    //   120: istore 10
    //   122: aload 8
    //   124: monitorexit
    //   125: iload 10
    //   127: ifeq +8 -> 135
    //   130: aload_0
    //   131: iconst_1
    //   132: invokespecial 131	com/netease/pris/offline/c:a	(I)V
    //   135: iload 5
    //   137: ifeq -127 -> 10
    //   140: aload_0
    //   141: invokespecial 245	com/netease/pris/offline/c:a	()V
    //   144: goto -134 -> 10
    //   147: astore 9
    //   149: aload 8
    //   151: monitorexit
    //   152: aload 9
    //   154: athrow
    //   155: aload 4
    //   157: ifnull +89 -> 246
    //   160: aload 4
    //   162: instanceof 247
    //   165: ifeq +81 -> 246
    //   168: aload_0
    //   169: aload 4
    //   171: checkcast 247	com/netease/pris/protocol/d
    //   174: getfield 249	com/netease/pris/protocol/d:h	Ljava/util/LinkedList;
    //   177: putfield 186	com/netease/pris/offline/c:g	Ljava/util/LinkedList;
    //   180: aload_0
    //   181: getfield 45	com/netease/pris/offline/c:k	Lcom/netease/pris/offline/ProcessResult;
    //   184: aload_0
    //   185: getfield 186	com/netease/pris/offline/c:g	Ljava/util/LinkedList;
    //   188: invokevirtual 116	java/util/LinkedList:size	()I
    //   191: invokevirtual 250	com/netease/pris/offline/ProcessResult:b	(I)V
    //   194: aload_0
    //   195: getfield 163	com/netease/pris/offline/c:i	Ljava/util/LinkedList;
    //   198: astore 6
    //   200: aload 6
    //   202: monitorenter
    //   203: aload_0
    //   204: invokespecial 243	com/netease/pris/offline/c:b	()Z
    //   207: ifeq +36 -> 243
    //   210: iload 5
    //   212: iconst_3
    //   213: if_icmpge +10 -> 223
    //   216: aload_0
    //   217: invokespecial 243	com/netease/pris/offline/c:b	()Z
    //   220: ifne +17 -> 237
    //   223: aload 6
    //   225: monitorexit
    //   226: goto -216 -> 10
    //   229: astore 7
    //   231: aload 6
    //   233: monitorexit
    //   234: aload 7
    //   236: athrow
    //   237: iinc 5 1
    //   240: goto -30 -> 210
    //   243: aload 6
    //   245: monitorexit
    //   246: aload_0
    //   247: invokespecial 245	com/netease/pris/offline/c:a	()V
    //   250: goto -240 -> 10
    //   253: iconst_1
    //   254: istore 10
    //   256: goto -134 -> 122
    //   259: iconst_0
    //   260: istore 10
    //   262: goto -140 -> 122
    //
    // Exception table:
    //   from	to	target	type
    //   65	125	147	finally
    //   149	152	147	finally
    //   203	234	229	finally
    //   243	246	229	finally
  }

  public void a(e parame)
  {
    this.l = parame;
  }

  public void b(byte paramByte, int paramInt)
  {
    this.k.a(paramInt);
  }

  public void b(int paramInt1, int paramInt2, int paramInt3, Object paramObject)
  {
    int m = 0;
    if (o());
    while (true)
    {
      return;
      int n;
      switch (paramInt1)
      {
      default:
        n = 0;
      case 10011:
      case 10002:
      case 10013:
      case 20403:
      case 10014:
      }
      while (true)
      {
        if (n == 0)
          break label126;
        a(n);
        h();
        super.e();
        d(paramInt1, paramObject);
        e(3);
        break;
        n = 3;
        continue;
        n = 4;
        continue;
        n = 5;
        continue;
        n = 6;
      }
      label126: switch (paramInt2)
      {
      default:
      case 900:
      case 901:
      }
    }
    while (true)
    {
      synchronized (this.i)
      {
        if (!this.i.remove(new Integer(paramInt3)))
          break label258;
        this.k.a(1);
        if ((b()) || (this.i.size() != 0))
          break label249;
        m = 1;
        i1 = 1;
        if (m == 0)
          continue;
        a(1);
        if (i1 == 0)
          break;
        a();
      }
      a();
      break;
      label249: int i1 = 0;
      m = 1;
      continue;
      label258: i1 = 0;
    }
  }

  public void c()
  {
    this.i = new LinkedList();
    this.k.d(this.c.size());
    this.k.f(com.netease.pris.a.u.a(com.netease.b.a.d.h().a()));
    a(1);
    a();
  }

  public void e()
  {
    super.e();
    e(2);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.offline.c
 * JD-Core Version:    0.6.0
 */